

@Controller
public class RegistrationFormController {
    @Autowired
    public RegistrationFormService service;



    @RequestMapping(value="/addS",method=RequestMethod.POST)
    public String addRegistrationForm(@Valid RegistrationForm registrationForm){
        String uname =registrationForm.getUname();
        String usex=registrationForm.getUsex();
        int uage=registrationForm.getUage();
        String uphone=registrationForm.getUphone();
        String uaddress=registrationForm.getUaddress();
        String uhospital=registrationForm.getUhospital();
        String ucategory=registrationForm.getUcategory();
        String udate=registrationForm.getUdate();
        service.insertRegistrationForm(uname,usex,uage,uphone,uaddress,uhospital,ucategory,udate);

        return "addSend";
    }

}